package com.hongsheng.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hongsheng.pojo.Bill;
import com.hongsheng.pojo.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @description 客户mapper,mybatisplus用法自带了一些常规的数据库操作
 **/
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {
    @Update("insert into tb_customer values(null,#{name},#{phone},#{sex},#{type},NOW(),NOW())")
    int insertCustomer(Customer customer);
    @Update("update tb_customer set name=#{name},phone=#{phone},sex=#{sex},type=#{type},last_time=NOW() where id=#{id}")
    int updateCustomer(Customer customer);

}
